package com.leetcode.algorithm.y22.m08.w5;

/**
 * 1470. 重新排列数组
 * 
 * https://leetcode.cn/problems/shuffle-the-array/
 * 
 * @author jie.deng
 *
 */
class Question1470Solution01 {

	public int[] shuffle(int[] nums, int n) {
		int[] result = new int[n * 2];
		int idx = 0;
		for (int i = 0; i < n; i++) {
			result[idx++] = nums[i];
			result[idx++] = nums[i + n];
		}
		return result;
	}

}